fix(conduit): schedule capture + insight via Pulse cron so Conduit works on Linux - #1650
fix(conduit): schedule capture + insight via Pulse cron so Conduit works on Linux#1650elhoim wants to merge 1 commit into
Conversation
|
Declining this and #1650 together, since they're one decision. Your diagnosis is right: those installers are launchd-only, so the jobs genuinely don't run on Linux. But the fix routes scheduling for jobs that currently run under launchd through Pulse cron, and on a macOS install that risks two schedulers owning the same job. I prototyped a single-owner guard to make it safe and then decided against the whole direction — adding a guard to protect the primary machine's scheduling from a change that only benefits a platform we can't test is the wrong trade. The standing rule here is that platform support should be as universal as possible but strictly additive: a second backend beside the first, never a change to the path the primary install already runs. #1692 (systemd If you want to take these two again in that shape — a Linux-only backend inside each installer, launchd untouched — that would land. |
Problem
Conduit's two scheduled jobs — the 120 s capture poll and the hourly insight read — are installed only via macOS
launchd(Conduit/InstallConduit.tsandInstallConduitInsight.ts, which write to~/Library/LaunchAgentsand calllaunchctl). On Linux there is no launchd, so neither job ever runs: nothing is captured, the hourlyBuildInsight.tsnever fires, and the Pulse /conduit page stays permanently empty. There was no non-macOS install path.Fix
Schedule Conduit through Pulse's own cron heartbeat loop instead of an OS-level daemon. Pulse already runs a cross-platform cron scheduler (
matchesCron/isDueinpulse.ts), active on every platform Pulse runs on. Moving Conduit's two jobs there makes them work on Linux and macOS alike, with no launchd/systemd dependency:Jobs run with
cwd = PULSE/, so the relativeConduit/…commands resolve, and Pulse's missing-script preflight already disables them cleanly on an install where the scripts aren't present.Why the insight job is safe under Pulse's minimal PATH
BuildInsight.tsuses the cheapest inference rung (haiku viaTOOLS/Inference.ts), which resolves theclaudebinary explicitly (Bun.which("claude")→~/.local/bin/claudefallback). That's the same minimal-PATH problem the launchd insight installer solved by baking a PATH into the plist — so it's a non-issue here.Verified on Linux (headless)
conduit-captureon load →captured 1 event(s), dispatched to log.BuildInsight.tsread the real events and wrote a content-type read (Development 100%with a narrative) — vs. the empty[]before.Scope / compatibility
PULSE.toml. No code changes.